package org.jackysoft.entity.nosql;

import java.util.Date;

import javax.persistence.Lob;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.jackysoft.util.OperationType;


public class OperationLog extends AbstractNoSqlEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = -7271486264539083387L;
	

	private String name;
	
	
	private Date createDate;
	

	private String details;
	private OperationType oprType;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Lob
	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}



	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof OperationLog) || (obj == null)) {
			return false;
		}
		OperationLog bean = (OperationLog) obj;		
		return bean.getObjectId().equals(this.objectId);
	}

	@Override
	public int hashCode() {

		return super.hashCode();
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	public int compareTo(OperationLog obj) {
		// TODO Auto-generated method stub
		return 0;
	}

	public OperationType getOprType() {
		return oprType;
	}

	public void setOprType(OperationType oprType) {
		this.oprType = oprType;
	}
}